using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VPJSEL
    {
        public DataRow Convert2PJSEL(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryPJSEL(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["PSLMANDANT"] = " ".PadRight(2 ); 
         dwReturn["PSLPROJNR"] = " ".PadRight(5 ); 
         dwReturn["PSLLFDNR"] = " ".PadRight(3 ); 
         dwReturn["PSLVERANTVERTR"] = " ".PadRight(1 ); 
         dwReturn["PSLADRZUS"] = " ".PadRight(25 ); 
         dwReturn["PSLKUNDNRV"] = " ".PadRight(8 ); 
         dwReturn["PSLKUNDNRB"] = " ".PadRight(8 ); 
         dwReturn["PSLVERBAND"] = " ".PadRight(8 ); 
         dwReturn["PSLZENTRALE"] = " ".PadRight(8 ); 
         dwReturn["PSLLKZ"] = " ".PadRight(3 ); 
         dwReturn["PSLPLZ"] = " ".PadRight(7 ); 
         dwReturn["PSLKUNDNA"] = " ".PadRight(8 ); 
         dwReturn["PSLSPRKZ"] = " ".PadRight(1 ); 
         dwReturn["PSLVB"] = " ".PadRight(3 ); 
         dwReturn["PSLVG"] = " ".PadRight(3 ); 
         dwReturn["PSLABC"] = " ".PadRight(1 ); 
         dwReturn["PSLVERTRETER"] = " ".PadRight(8 ); 
         dwReturn["PSLWERBESL"] = " ".PadRight(3 ); 
         dwReturn["PSLKOLLSEG"] = " ".PadRight(3 ); 
         dwReturn["PSLABNGRP"] = " ".PadRight(3 ); 
         dwReturn["PSLDISTRWEG"] = " ".PadRight(3 ); 
         dwReturn["PSLSTATGEB"] = " ".PadRight(3 ); 
         dwReturn["PSLABSSCHL"] = " ".PadRight(3 ); 
         dwReturn["PSLPREISGRP"] = " ".PadRight(8 ); 
         dwReturn["PSLZAHLBED"] = " ".PadRight(3 ); 
         dwReturn["PSLLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["PSLSTLAND"] = " ".PadRight(2 ); 
         dwReturn["PSLSTREGBZ"] = " ".PadRight(2 ); 
         dwReturn["PSLSTKREIS"] = " ".PadRight(2 ); 
         dwReturn["PSLSTORT"] = " ".PadRight(3 ); 
         dwReturn["PSLPRODGRP"] = " ".PadRight(3 ); 
         dwReturn["PSLKONKUR"] = " ".PadRight(8 ); 
         dwReturn["PSLANTEILV"] = " ".PadRight(0 ); 
         dwReturn["PSLANTEILB"] = " ".PadRight(0 ); 
         dwReturn["PSLUMSATZGRV"] = " ".PadRight(0 ); 
         dwReturn["PSLUMSATZGRB"] = " ".PadRight(0 ); 
         dwReturn["PSGEBDATV"] = " ".PadRight(0 ); 
         dwReturn["PSGEBDATB"] = " ".PadRight(0 ); 
         dwReturn["PSLPRESTYP"] = " ".PadRight(3 ); 
         dwReturn["PSLVIPGRP"] = " ".PadRight(8 ); 
         dwReturn["PSLKOLL"] = " ".PadRight(5 ); 
         dwReturn["PSLART"] = " ".PadRight(24 ); 
         dwReturn["PSLFARBE"] = " ".PadRight(10 ); 
         dwReturn["PSLGROE"] = " ".PadRight(7 ); 
         dwReturn["PSLUMSATZMIN"] = " ".PadRight(0 ); 
         dwReturn["PSLUMSATZV"] = " ".PadRight(0 ); 
         dwReturn["PSLUMSATZB"] = " ".PadRight(0 ); 
         dwReturn["PSLZEITRAUMUV"] = " ".PadRight(0 ); 
         dwReturn["PSLZEITRAUMUB"] = " ".PadRight(0 ); 
         dwReturn["PSLEINGANGV"] = " ".PadRight(0 ); 
         dwReturn["PSLEINGANGB"] = " ".PadRight(0 ); 
         dwReturn["PSLZEITRAUMEV"] = " ".PadRight(0 ); 
         dwReturn["PSLZEITRAUMEB"] = " ".PadRight(0 ); 
         dwReturn["PSLPRDGRP"] = " ".PadRight(3 ); 
         dwReturn["PSLARTGRP"] = " ".PadRight(3 ); 
         dwReturn["PSLPOSTYP"] = " ".PadRight(3 ); 
         dwReturn["PSLAUFART"] = " ".PadRight(2 ); 
         dwReturn["PSLORDERWEG"] = " ".PadRight(4 ); 
         dwReturn["PSLSTORNGR"] = " ".PadRight(4 ); 
         dwReturn["PSLFILLER"] = " ".PadRight(24 ); 
         dwReturn["PSLNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["PSLNEUDAT"] = " ".PadRight(0 ); 
         dwReturn["PSLAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["PSLAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["PSLAENDZL"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapPJSEL(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SavePJSEL(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryPJSEL(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapPJSEL(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertPJSEL(dwLocal, ITXDBVERSION);
            }
            UpdatePJSEL(dwLocal);
        }
        public void InsertPJSEL(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO PJSEL(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryPJSEL(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM PJSEL WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM PJSEL  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "PJSEL";
            Return = Result;
            return Return;
        }
        public void DeletePJSEL(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM PJSEL   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdatePJSEL(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE PJSEL SET "
                    +"PSLMANDANT= :PSLMANDANT,"
                    +"PSLPROJNR= :PSLPROJNR,"
                    +"PSLLFDNR= :PSLLFDNR,"
                    +"PSLVERANTVERTR= :PSLVERANTVERTR,"
                    +"PSLADRZUS= :PSLADRZUS,"
                    +"PSLKUNDNRV= :PSLKUNDNRV,"
                    +"PSLKUNDNRB= :PSLKUNDNRB,"
                    +"PSLVERBAND= :PSLVERBAND,"
                    +"PSLZENTRALE= :PSLZENTRALE,"
                    +"PSLLKZ= :PSLLKZ,"
                    +"PSLPLZ= :PSLPLZ,"
                    +"PSLKUNDNA= :PSLKUNDNA,"
                    +"PSLSPRKZ= :PSLSPRKZ,"
                    +"PSLVB= :PSLVB,"
                    +"PSLVG= :PSLVG,"
                    +"PSLABC= :PSLABC,"
                    +"PSLVERTRETER= :PSLVERTRETER,"
                    +"PSLWERBESL= :PSLWERBESL,"
                    +"PSLKOLLSEG= :PSLKOLLSEG,"
                    +"PSLABNGRP= :PSLABNGRP,"
                    +"PSLDISTRWEG= :PSLDISTRWEG,"
                    +"PSLSTATGEB= :PSLSTATGEB,"
                    +"PSLABSSCHL= :PSLABSSCHL,"
                    +"PSLPREISGRP= :PSLPREISGRP,"
                    +"PSLZAHLBED= :PSLZAHLBED,"
                    +"PSLLIEFBED= :PSLLIEFBED,"
                    +"PSLSTLAND= :PSLSTLAND,"
                    +"PSLSTREGBZ= :PSLSTREGBZ,"
                    +"PSLSTKREIS= :PSLSTKREIS,"
                    +"PSLSTORT= :PSLSTORT,"
                    +"PSLPRODGRP= :PSLPRODGRP,"
                    +"PSLKONKUR= :PSLKONKUR,"
                    +"PSLANTEILV= :PSLANTEILV,"
                    +"PSLANTEILB= :PSLANTEILB,"
                    +"PSLUMSATZGRV= :PSLUMSATZGRV,"
                    +"PSLUMSATZGRB= :PSLUMSATZGRB,"
                    +"PSGEBDATV= :PSGEBDATV,"
                    +"PSGEBDATB= :PSGEBDATB,"
                    +"PSLPRESTYP= :PSLPRESTYP,"
                    +"PSLVIPGRP= :PSLVIPGRP,"
                    +"PSLKOLL= :PSLKOLL,"
                    +"PSLART= :PSLART,"
                    +"PSLFARBE= :PSLFARBE,"
                    +"PSLGROE= :PSLGROE,"
                    +"PSLUMSATZMIN= :PSLUMSATZMIN,"
                    +"PSLUMSATZV= :PSLUMSATZV,"
                    +"PSLUMSATZB= :PSLUMSATZB,"
                    +"PSLZEITRAUMUV= :PSLZEITRAUMUV,"
                    +"PSLZEITRAUMUB= :PSLZEITRAUMUB,"
                    +"PSLEINGANGV= :PSLEINGANGV,"
                    +"PSLEINGANGB= :PSLEINGANGB,"
                    +"PSLZEITRAUMEV= :PSLZEITRAUMEV,"
                    +"PSLZEITRAUMEB= :PSLZEITRAUMEB,"
                    +"PSLPRDGRP= :PSLPRDGRP,"
                    +"PSLARTGRP= :PSLARTGRP,"
                    +"PSLPOSTYP= :PSLPOSTYP,"
                    +"PSLAUFART= :PSLAUFART,"
                    +"PSLORDERWEG= :PSLORDERWEG,"
                    +"PSLSTORNGR= :PSLSTORNGR,"
                    +"PSLFILLER= :PSLFILLER,"
                    +"PSLNEUBEN= :PSLNEUBEN,"
                    +"PSLNEUDAT= :PSLNEUDAT,"
                    +"PSLAENDBEN= :PSLAENDBEN,"
                    +"PSLAENDDAT= :PSLAENDDAT,"
                    +"PSLAENDZL= :PSLAENDZL,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("PSLMANDANT", OracleType.NVarChar).Value = dwData["PSLMANDANT"].ToString(); 
          or1.Parameters.Add("PSLPROJNR", OracleType.NVarChar).Value = dwData["PSLPROJNR"].ToString(); 
          or1.Parameters.Add("PSLLFDNR", OracleType.NVarChar).Value = dwData["PSLLFDNR"].ToString(); 
          or1.Parameters.Add("PSLVERANTVERTR", OracleType.NVarChar).Value = dwData["PSLVERANTVERTR"].ToString(); 
          or1.Parameters.Add("PSLADRZUS", OracleType.NVarChar).Value = dwData["PSLADRZUS"].ToString(); 
          or1.Parameters.Add("PSLKUNDNRV", OracleType.NVarChar).Value = dwData["PSLKUNDNRV"].ToString(); 
          or1.Parameters.Add("PSLKUNDNRB", OracleType.NVarChar).Value = dwData["PSLKUNDNRB"].ToString(); 
          or1.Parameters.Add("PSLVERBAND", OracleType.NVarChar).Value = dwData["PSLVERBAND"].ToString(); 
          or1.Parameters.Add("PSLZENTRALE", OracleType.NVarChar).Value = dwData["PSLZENTRALE"].ToString(); 
          or1.Parameters.Add("PSLLKZ", OracleType.NVarChar).Value = dwData["PSLLKZ"].ToString(); 
          or1.Parameters.Add("PSLPLZ", OracleType.NVarChar).Value = dwData["PSLPLZ"].ToString(); 
          or1.Parameters.Add("PSLKUNDNA", OracleType.NVarChar).Value = dwData["PSLKUNDNA"].ToString(); 
          or1.Parameters.Add("PSLSPRKZ", OracleType.NVarChar).Value = dwData["PSLSPRKZ"].ToString(); 
          or1.Parameters.Add("PSLVB", OracleType.NVarChar).Value = dwData["PSLVB"].ToString(); 
          or1.Parameters.Add("PSLVG", OracleType.NVarChar).Value = dwData["PSLVG"].ToString(); 
          or1.Parameters.Add("PSLABC", OracleType.NVarChar).Value = dwData["PSLABC"].ToString(); 
          or1.Parameters.Add("PSLVERTRETER", OracleType.NVarChar).Value = dwData["PSLVERTRETER"].ToString(); 
          or1.Parameters.Add("PSLWERBESL", OracleType.NVarChar).Value = dwData["PSLWERBESL"].ToString(); 
          or1.Parameters.Add("PSLKOLLSEG", OracleType.NVarChar).Value = dwData["PSLKOLLSEG"].ToString(); 
          or1.Parameters.Add("PSLABNGRP", OracleType.NVarChar).Value = dwData["PSLABNGRP"].ToString(); 
          or1.Parameters.Add("PSLDISTRWEG", OracleType.NVarChar).Value = dwData["PSLDISTRWEG"].ToString(); 
          or1.Parameters.Add("PSLSTATGEB", OracleType.NVarChar).Value = dwData["PSLSTATGEB"].ToString(); 
          or1.Parameters.Add("PSLABSSCHL", OracleType.NVarChar).Value = dwData["PSLABSSCHL"].ToString(); 
          or1.Parameters.Add("PSLPREISGRP", OracleType.NVarChar).Value = dwData["PSLPREISGRP"].ToString(); 
          or1.Parameters.Add("PSLZAHLBED", OracleType.NVarChar).Value = dwData["PSLZAHLBED"].ToString(); 
          or1.Parameters.Add("PSLLIEFBED", OracleType.NVarChar).Value = dwData["PSLLIEFBED"].ToString(); 
          or1.Parameters.Add("PSLSTLAND", OracleType.NVarChar).Value = dwData["PSLSTLAND"].ToString(); 
          or1.Parameters.Add("PSLSTREGBZ", OracleType.NVarChar).Value = dwData["PSLSTREGBZ"].ToString(); 
          or1.Parameters.Add("PSLSTKREIS", OracleType.NVarChar).Value = dwData["PSLSTKREIS"].ToString(); 
          or1.Parameters.Add("PSLSTORT", OracleType.NVarChar).Value = dwData["PSLSTORT"].ToString(); 
          or1.Parameters.Add("PSLPRODGRP", OracleType.NVarChar).Value = dwData["PSLPRODGRP"].ToString(); 
          or1.Parameters.Add("PSLKONKUR", OracleType.NVarChar).Value = dwData["PSLKONKUR"].ToString(); 
          or1.Parameters.Add("PSLANTEILV", OracleType.NVarChar).Value = dwData["PSLANTEILV"].ToString(); 
          or1.Parameters.Add("PSLANTEILB", OracleType.NVarChar).Value = dwData["PSLANTEILB"].ToString(); 
          or1.Parameters.Add("PSLUMSATZGRV", OracleType.NVarChar).Value = dwData["PSLUMSATZGRV"].ToString(); 
          or1.Parameters.Add("PSLUMSATZGRB", OracleType.NVarChar).Value = dwData["PSLUMSATZGRB"].ToString(); 
          or1.Parameters.Add("PSGEBDATV", OracleType.NVarChar).Value = dwData["PSGEBDATV"].ToString(); 
          or1.Parameters.Add("PSGEBDATB", OracleType.NVarChar).Value = dwData["PSGEBDATB"].ToString(); 
          or1.Parameters.Add("PSLPRESTYP", OracleType.NVarChar).Value = dwData["PSLPRESTYP"].ToString(); 
          or1.Parameters.Add("PSLVIPGRP", OracleType.NVarChar).Value = dwData["PSLVIPGRP"].ToString(); 
          or1.Parameters.Add("PSLKOLL", OracleType.NVarChar).Value = dwData["PSLKOLL"].ToString(); 
          or1.Parameters.Add("PSLART", OracleType.NVarChar).Value = dwData["PSLART"].ToString(); 
          or1.Parameters.Add("PSLFARBE", OracleType.NVarChar).Value = dwData["PSLFARBE"].ToString(); 
          or1.Parameters.Add("PSLGROE", OracleType.NVarChar).Value = dwData["PSLGROE"].ToString(); 
          or1.Parameters.Add("PSLUMSATZMIN", OracleType.NVarChar).Value = dwData["PSLUMSATZMIN"].ToString(); 
          or1.Parameters.Add("PSLUMSATZV", OracleType.NVarChar).Value = dwData["PSLUMSATZV"].ToString(); 
          or1.Parameters.Add("PSLUMSATZB", OracleType.NVarChar).Value = dwData["PSLUMSATZB"].ToString(); 
          or1.Parameters.Add("PSLZEITRAUMUV", OracleType.NVarChar).Value = dwData["PSLZEITRAUMUV"].ToString(); 
          or1.Parameters.Add("PSLZEITRAUMUB", OracleType.NVarChar).Value = dwData["PSLZEITRAUMUB"].ToString(); 
          or1.Parameters.Add("PSLEINGANGV", OracleType.NVarChar).Value = dwData["PSLEINGANGV"].ToString(); 
          or1.Parameters.Add("PSLEINGANGB", OracleType.NVarChar).Value = dwData["PSLEINGANGB"].ToString(); 
          or1.Parameters.Add("PSLZEITRAUMEV", OracleType.NVarChar).Value = dwData["PSLZEITRAUMEV"].ToString(); 
          or1.Parameters.Add("PSLZEITRAUMEB", OracleType.NVarChar).Value = dwData["PSLZEITRAUMEB"].ToString(); 
          or1.Parameters.Add("PSLPRDGRP", OracleType.NVarChar).Value = dwData["PSLPRDGRP"].ToString(); 
          or1.Parameters.Add("PSLARTGRP", OracleType.NVarChar).Value = dwData["PSLARTGRP"].ToString(); 
          or1.Parameters.Add("PSLPOSTYP", OracleType.NVarChar).Value = dwData["PSLPOSTYP"].ToString(); 
          or1.Parameters.Add("PSLAUFART", OracleType.NVarChar).Value = dwData["PSLAUFART"].ToString(); 
          or1.Parameters.Add("PSLORDERWEG", OracleType.NVarChar).Value = dwData["PSLORDERWEG"].ToString(); 
          or1.Parameters.Add("PSLSTORNGR", OracleType.NVarChar).Value = dwData["PSLSTORNGR"].ToString(); 
          or1.Parameters.Add("PSLFILLER", OracleType.NVarChar).Value = dwData["PSLFILLER"].ToString(); 
          or1.Parameters.Add("PSLNEUBEN", OracleType.NVarChar).Value = dwData["PSLNEUBEN"].ToString(); 
          or1.Parameters.Add("PSLNEUDAT", OracleType.NVarChar).Value = dwData["PSLNEUDAT"].ToString(); 
          or1.Parameters.Add("PSLAENDBEN", OracleType.NVarChar).Value = dwData["PSLAENDBEN"].ToString(); 
          or1.Parameters.Add("PSLAENDDAT", OracleType.NVarChar).Value = dwData["PSLAENDDAT"].ToString(); 
          or1.Parameters.Add("PSLAENDZL", OracleType.NVarChar).Value = dwData["PSLAENDZL"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
